﻿<r:RibbonWindow x:Uid="eComic" x:Class="MainWindow" x:Name="eComic"
                xmlns:r="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                xmlns:local="clr-namespace:eComic2010"
                xmlns:lib="clr-namespace:LibraryFiles;assembly=LibraryFiles"
                Title="eComic - Sequential Image Viewer" Background="White" ResizeMode="CanResizeWithGrip" Width="875"
                Height="800" AllowDrop="True" Icon="/eComic2010;component/Resources/ecomic_icon.ico" IconVisibility="Collapsed"
                Initialized="eComic_Initialized" DragEnter="eComic_DragEnter"  Drop="eComic_Drop" Closing="eComic_Closing" 
                KeyUp="eComic_KeyUp" MouseWheel="eComic_MouseWheel" >
    <r:RibbonWindow.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1">
            <Style x:Uid="Style_1" x:Key="PageListBoxStyle" TargetType="{x:Type ListBox}">
                <Setter x:Uid="Setter_1" Property="Template">
                    <Setter.Value>
                        <ControlTemplate x:Uid="ControlTemplate_1" TargetType="{x:Type ListBox}">
                            <Border x:Uid="Border_1" Background="{TemplateBinding Panel.Background}"
								    BorderBrush="{TemplateBinding Border.BorderBrush}"
								    BorderThickness="{TemplateBinding Border.BorderThickness}">
                                <ScrollViewer x:Uid="ScrollViewer_1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Visible" 
                                              Template="{DynamicResource ScrollViewerControlTemplate1}">
                                    <local:eComicVirtualizingStackPanel x:Uid="local:eComicVirtualizingStackPanel_1" IsItemsHost="True" Orientation="Vertical"/>
                                </ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Uid="Style_2" x:Key="PageListBoxStyleHorizontal" TargetType="{x:Type ListBox}">
                <Setter x:Uid="Setter_2" Property="Template">
                    <Setter.Value>
                        <ControlTemplate x:Uid="ControlTemplate_2" TargetType="{x:Type ListBox}">
                            <Border x:Uid="Border_2" Background="{TemplateBinding Panel.Background}"
								    BorderBrush="{TemplateBinding Border.BorderBrush}"
								    BorderThickness="{TemplateBinding Border.BorderThickness}">
                                <ScrollViewer x:Uid="ScrollViewer_2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled"  
                                              Template="{DynamicResource ScrollViewerControlTemplate1}">
                                    <local:eComicVirtualizingStackPanel x:Uid="local:eComicVirtualizingStackPanel_2" IsItemsHost="True" Orientation="Horizontal" />
                                </ScrollViewer>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <local:comicArchiveTypeConverter x:Uid="local:comicArchiveTypeConverter_1" x:Key="catCov" />
            <BooleanToVisibilityConverter x:Uid="BooleanToVisibilityConverter_1" x:Key="BoolToVis" />
            <local:comicPageVisibilityConverter x:Uid="local:comicPageVisibilityConverter_1" x:Key="cmpVis" />
         

            <r:RibbonCommand 
                x:Uid="r:RibbonCommand_1" x:Key="ExitApplicationCommand"
                Executed="ExitApplicationCommand_Executed" 
                LabelTitle="Exit"
                SmallImageSource="/LibraryFiles;component/Resources/exit21.png"
                LargeImageSource="/LibraryFiles;component/Resources/exit64.png"
                />

            <r:RibbonCommand x:Uid="r:RibbonCommand_2" x:Key="brightCommand"
                             CanExecute="brightCommand_CanExecute" Executed="brightCommand_Executed" 
                             ToolTipDescription="Click this to brighten the displayed image"
                             LabelTitle="Brighten" ToolTipTitle="Brighten"
                             SmallImageSource="/LibraryFiles;component/Resources/viewmagfit_24.png" LargeImageSource="/LibraryFiles;component/Resources/viewmagfit.png" />
            <r:RibbonCommand 
                x:Uid="r:RibbonCommand_3" x:Key="OpenCommand" 
                Executed="OpenCommand_Executed"  
                LabelTitle="Open"
                ToolTipTitle="Open An Existing Archive"
                ToolTipDescription="Opens an existing archive for viewing"                
                LargeImageSource="/LibraryFiles;component/Resources/open32.png" 
                SmallImageSource="/LibraryFiles;component/Resources/open16.png" />
            <r:RibbonCommand x:Uid="r:RibbonCommand_4" x:Key="OpenDirCommand" Executed="OpenDirCommand_Executed" 
                             LabelTitle="Open Directory" ToolTipTitle="Open Directory" ToolTipDescription="Open a directory to view existing files"
                             SmallImageSource="/LibraryFiles;component/Resources/FolderOpen_24x24_72.png" LargeImageSource="/LibraryFiles;component/Resources/FolderOpen_48x48_72.png" />
            <r:RibbonCommand 
                x:Uid="r:RibbonCommand_5" x:Key="ResumeReadingKey" 
                Executed="ResumeReadingArchive_Executed" CanExecute="ResumeReadingArchive_CanExecute"  
                LabelTitle="Resume Reading"
                ToolTipTitle="Resume Reading"
                ToolTipDescription="Reloads the last Comic Archive that was loaded."
                SmallImageSource="/LibraryFiles;component/Resources/reload24.png"
                LargeImageSource="/LibraryFiles;component/Resources/reload.png"
                />
            <r:RibbonCommand x:Uid="r:RibbonCommand_6" x:Key="LoupeCommand" CanExecute="LoupeCommand_CanExecute" 
                             LargeImageSource="/LibraryFiles;component/Resources/document-preview.png" SmallImageSource="/LibraryFiles;component/Resources/document-preview_24.png"
                             LabelTitle="Loupe Magnification" ToolTipTitle="Loupe Magnification" 
                             ToolTipDescription="Magnifys a specific portion of the screen at 1 time."
                             />
            <r:RibbonCommand 
                x:Uid="r:RibbonCommand_7" x:Key="PreviousArchive"
                CanExecute="PreviousArchive_CanExecute" 
                Executed="PreviousArchive_Executed" 
                LabelTitle="Load Previous Archive"
                ToolTipTitle="Load Previous Archive"
                ToolTipDescription="Loads the previous Archive"
                SmallImageSource="/LibraryFiles;component/Resources/previous24.png"
                LargeImageSource="/LibraryFiles;component/Resources/previous.png"
                />
            <r:RibbonCommand x:Uid="r:RibbonCommand_8" x:Key="FullScreenCommand" Executed="FullScreenCommand_Executed" 
                             LabelTitle="Full Screen" ToolTipTitle="Full Screen" ToolTipDescription="Switch application to full screen mode. This hides the menu ribbon, status bar and page list."
                             SmallImageSource="/LibraryFiles;component/Resources/view-fullscreen-24.png" LargeImageSource="/LibraryFiles;component/Resources/view-fullscreen-64.png" />
            <r:RibbonCommand x:Uid="r:RibbonCommand_9" x:Key="SaveCommand" 
                             CanExecute="Savecommand_CanExecute" Executed="Savecommand_Executed" 
                             LabelTitle="Save" ToolTipTitle="Save" ToolTipDescription="When viewing a directory of images, the system can save the directory as a CBZ file."
                             SmallImageSource="/LibraryFiles;component/Resources/document-save-24.png" LargeImageSource="/LibraryFiles;component/Resources/document-save-64.png" />
            <r:RibbonCommand 
                x:Uid="r:RibbonCommand_10" x:Key="NextArchive" 
                CanExecute="NextArchive_CanExecute" Executed="NextArchive_Executed" 
                LabelTitle="Load Next Archive"
                ToolTipTitle="Load Next Archive"
                ToolTipDescription="Loads the next Archive"
                SmallImageSource="/LibraryFiles;component/Resources/next24.png"
                LargeImageSource="/LibraryFiles;component/Resources/next.png"
                />
            <r:RibbonCommand x:Uid="r:RibbonCommand_11" x:Key="ZoomIn"
                             CanExecute="ZoomOps_CanExecute" Executed="ZoomIn_Executed" 
                             LabelTitle="Zoom In" ToolTipTitle="Zoom In" ToolTipDescription="Zooms In on the image"
                             SmallImageSource="/LibraryFiles;component/Resources/viewmag_plus_24.png" LargeImageSource="/LibraryFiles;component/Resources/viewmag_plus_128.png" />
            <r:RibbonCommand x:Uid="r:RibbonCommand_12" x:Key="ZoomOut"
                             CanExecute="ZoomOps_CanExecute" Executed="ZoomOut_Executed" 
                             LabelTitle="Zoom Out" ToolTipDescription="Zooms out from the image" ToolTipTitle="Zoom Out"
                             SmallImageSource="/LibraryFiles;component/Resources/viewmag_minus_24.png" LargeImageSource="/LibraryFiles;component/Resources/viewmag_minus_128.png" />
            <r:RibbonCommand x:Uid="r:RibbonCommand_13" x:Key="ZoomFit"  
                             CanExecute="ZoomOps_CanExecute" Executed="ZoomFit_Executed" 
                             LabelTitle="Fit to Screen" ToolTipTitle="Fit to Screen" ToolTipDescription="Makes the image fit the display area of the screen"
                             SmallImageSource="/LibraryFiles;component/Resources/viewmagfit_24.png" LargeImageSource="/LibraryFiles;component/Resources/viewmagfit.png" />
            <r:RibbonCommand x:Uid="r:RibbonCommand_14" x:Key="Zoom1to1" 
                             CanExecute="ZoomOps_CanExecute" Executed="Zoom1to1_Executed" 
                             LabelTitle="Original Image Size" ToolTipTitle="Original Image Size" ToolTipDescription="Displays the image in its original size."
                             SmallImageSource="/LibraryFiles;component/Resources/viewmag1_24.png" LargeImageSource="/LibraryFiles;component/Resources/viewmag1.png" />
            
            <r:RibbonCommand x:Uid="r:RibbonCommand_15" x:Key="GotoPageCommand"  CanExecute="GotoPage_CanExecute" 
                             LabelTitle="Goto Page" Executed="GotoPage_Executed" 
                             SmallImageSource="/LibraryFiles;component/Resources/GoToPictureDocument24.png" LargeImageSource="/LibraryFiles;component/Resources/GoToPictureDocument.png"
                             />
            <r:RibbonCommand x:Uid="r:RibbonCommand_16" x:Key="FileControls"
                             LabelTitle="File Controls" CanExecute="FileControls_CanExecute" Executed="FileControls_Executed"                                
                             SmallImageSource="/LibraryFiles;component/Resources/compass-icon21.png" LargeImageSource="/LibraryFiles;component/Resources/compass-icon.png"
                             />
            <r:RibbonCommand x:Uid="r:RibbonCommand_17" x:Key="OptionsCommand" Executed="OptionsCommand_Executed" 
                             LabelTitle="Options" 
                             SmallImageSource="/LibraryFiles;component/Resources/options_24.png" LargeImageSource="/LibraryFiles;component/Resources/options_64.png" />
            
            <CommandBinding x:Uid="CommandBinding_1" x:Key="cmdFavoriteCommand"  CanExecute="cmdFavoriteCommand_CanExecute" 
                            Executed="cmdFavoriteCommand_Executed" />
            
        </ResourceDictionary>
    </r:RibbonWindow.Resources>
    <Grid x:Uid="Grid_1">
    <DockPanel x:Uid="DockPanel_1">
        <r:Ribbon x:Uid="ribbonMenu" DockPanel.Dock="Top" IsMinimized="True" Name="ribbonMenu" Title="eComic - Sequential Image Viewer">
            <r:Ribbon.ApplicationMenu>
                <r:RibbonApplicationMenu x:Uid="r:RibbonApplicationMenu_1">
                    <r:RibbonApplicationMenu.Footer>
                        <DockPanel x:Uid="DockPanel_2" LastChildFill="False">
                            <r:RibbonButton x:Uid="rbtExit" Name="rbtExit" Command="{StaticResource ExitApplicationCommand}" DockPanel.Dock="Right" />
                            <r:RibbonButton x:Uid="r:RibbonButton_1" Command="{StaticResource OptionsCommand}" DockPanel.Dock="Right" Margin="0,0,5,0" />
                        </DockPanel>
                    </r:RibbonApplicationMenu.Footer>
                    <r:RibbonApplicationMenu.RecentItemList>
                        <HeaderedContentControl x:Uid="HeaderedContentControl_1">
                            <HeaderedContentControl.Header>
                                <StackPanel x:Uid="StackPanel_1" Orientation="Vertical" >
                                    <Label x:Uid="Label_1" Content="Recently Viewed Files" FontWeight="Bold" />
                                    <Separator x:Uid="Separator_1" />
                                </StackPanel>
                            </HeaderedContentControl.Header>
                            <r:RibbonHighlightingList x:Uid="mruList" MostRecentFileSelected="mruList_MostRecentFileSelected" 
                                                    DisplayMemberPath="Name" Name="mruList" ItemsSource="{Binding MRU}"
                                                  />
                        </HeaderedContentControl>
                    </r:RibbonApplicationMenu.RecentItemList>
                    <r:RibbonApplicationMenu.Command>
                        <r:RibbonCommand x:Uid="r:RibbonCommand_18" LabelTitle="Application Button"
                                         LabelDescription="Close the application."
                                         LargeImageSource="Resources/ecomic_icon-001.png"
                                         ToolTipTitle="eComic-Sequential Image Viewer"
                                         ToolTipDescription="" />
                    </r:RibbonApplicationMenu.Command>
                    <r:RibbonApplicationMenuItem x:Uid="r:RibbonApplicationMenuItem_1" Command="{StaticResource OpenCommand}" />
                    <r:RibbonApplicationMenuItem x:Uid="r:RibbonApplicationMenuItem_2" Command="{StaticResource OpenDirCommand}" />
                    <r:RibbonApplicationMenuItem x:Uid="r:RibbonApplicationMenuItem_3" Command="{StaticResource ResumeReadingKey}" />
                    <Separator x:Uid="Separator_2" />
                    <r:RibbonApplicationMenuItem x:Uid="ramiPreviousArchive" Name="ramiPreviousArchive" Command="{StaticResource PreviousArchive}" />
                    <r:RibbonApplicationMenuItem x:Uid="ramiNextArchive" Name="ramiNextArchive" Command="{StaticResource NextArchive}" />
                    <r:RibbonApplicationMenuItem x:Uid="r:RibbonApplicationMenuItem_4" Command="{StaticResource GotoPageCommand}"  />

                </r:RibbonApplicationMenu>

            </r:Ribbon.ApplicationMenu>
            <!-- Quick pick menu -->
            <r:Ribbon.QuickAccessToolBar>
                <r:RibbonQuickAccessToolBar x:Uid="r:RibbonQuickAccessToolBar_1" CanUserCustomize="True" >
                    <r:RibbonButton x:Uid="r:RibbonButton_2" Command="{StaticResource OpenCommand}" r:RibbonQuickAccessToolBar.Placement="InToolBar" />
                    <r:RibbonButton x:Uid="r:RibbonButton_3" Command="{StaticResource ResumeReadingKey}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar" />
                    <r:RibbonButton x:Uid="r:RibbonButton_4" Command="{StaticResource PreviousArchive}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar" />
                    <r:RibbonButton x:Uid="r:RibbonButton_5" Command="{StaticResource NextArchive}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenuAndToolBar" />
                    <r:RibbonButton x:Uid="r:RibbonButton_6" Command="{StaticResource ZoomOut}"  r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu" />
                    <r:RibbonButton x:Uid="r:RibbonButton_7" Command="{StaticResource ZoomIn}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu" />
                    <r:RibbonButton x:Uid="r:RibbonButton_8" Command="{StaticResource FullScreenCommand}" r:RibbonQuickAccessToolBar.Placement="InCustomizeMenu"  />

                </r:RibbonQuickAccessToolBar>
            </r:Ribbon.QuickAccessToolBar>

            <r:RibbonTab x:Uid="r:RibbonTab_1" >
                <r:RibbonTab.Label >Home</r:RibbonTab.Label>
                <r:RibbonTab.Groups>
                    <r:RibbonGroup x:Uid="grpFileOps" x:Name="grpFileOps"  >                        
                        <r:RibbonButton x:Uid="r:RibbonButton_9" Command="{StaticResource OpenCommand}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_10" Command="{StaticResource OpenDirCommand}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_11" Command="{StaticResource SaveCommand}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_12" Command="{StaticResource ResumeReadingKey}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_13" Command="{StaticResource PreviousArchive}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_14" Command="{StaticResource NextArchive}" />
                        
                    </r:RibbonGroup>
                    <r:RibbonGroup x:Uid="grpOtherCmds" x:Name="grpOtherCmds">
                        <r:RibbonButton x:Uid="r:RibbonButton_15" Command="{StaticResource OptionsCommand}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_16" Command="{StaticResource FullScreenCommand}" />
                    </r:RibbonGroup>
                </r:RibbonTab.Groups>
            </r:RibbonTab>
                <r:RibbonTab x:Uid="rtbImageCommands" Name="rtbImageCommands" Visibility="{Binding ElementName=lstPages, Path=SelectedItem, Converter={StaticResource cmpVis}}">
                    <r:RibbonTab.Label>Image</r:RibbonTab.Label>

                    <r:RibbonGroup x:Uid="Magnification" Name="Magnification"> 
                        <r:RibbonToggleButton x:Uid="chkLoupe" x:Name="chkLoupe" Command="{StaticResource LoupeCommand}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_17" Command="{StaticResource ZoomFit}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_18" Command="{StaticResource ZoomOut}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_19" Command="{StaticResource ZoomIn}" />
                        <r:RibbonButton x:Uid="r:RibbonButton_20" Command="{StaticResource Zoom1to1}" />
                    </r:RibbonGroup>
                    <r:RibbonGroup x:Uid="Display" Name="Display" Visibility="Collapsed"   >
                        <r:RibbonButton x:Uid="r:RibbonButton_21" Command="{StaticResource brightCommand}" />
                    </r:RibbonGroup>
                </r:RibbonTab>
            </r:Ribbon>

        <Popup x:Uid="ppPageNames" PlacementTarget="{Binding ElementName=lblPageName}" AllowsTransparency="True" x:Name="ppPageNames"
               PopupAnimation="Slide" StaysOpen="False"  >
            <ListBox x:Uid="lstPageNames" Name="lstPageNames" 
                     Margin="6,6,6,0" VerticalAlignment="Top"  IsSynchronizedWithCurrentItem="True"   ItemsSource="{Binding Path=Pages}"
                     ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                     SelectionMode="Single" AllowDrop="True" Visibility="Visible" MaxHeight="300" MinHeight="150" MaxWidth="300" MinWidth="250" >
                <ListBox.ItemTemplate>
                    <DataTemplate  x:Uid="DataTemplate_1" DataType="{x:Type local:comicPage}">
                        <TextBlock x:Uid="TextBlock_1" Text="{Binding Path=FileName}" />
                    </DataTemplate>
                </ListBox.ItemTemplate>
                <ListBox.Background>
                    <LinearGradientBrush x:Uid="LinearGradientBrush_1" EndPoint="0.466,0.06" StartPoint="0.465,0.877">
                        <GradientStop x:Uid="GradientStop_1" Color="#E0E7EF" Offset="0"/>
                        <GradientStop x:Uid="GradientStop_2" Color="#99A3AF" Offset="1"/>
                    </LinearGradientBrush>
                </ListBox.Background>
            </ListBox>
        </Popup>

        <Popup x:Uid="ppPageNumber" PlacementTarget="{Binding ElementName=lblPageNumber}" AllowsTransparency="True" x:Name="ppPageNumber"
               PopupAnimation="Slide" StaysOpen="True" >
            <StackPanel x:Uid="StackPanel_2" Orientation="Vertical">
                <StackPanel.Background>
                    <LinearGradientBrush x:Uid="LinearGradientBrush_2" EndPoint="0.466,0.06" StartPoint="0.465,0.877">
                        <GradientStop x:Uid="GradientStop_3" Color="#E0E7EF" Offset="0"/>
                        <GradientStop x:Uid="GradientStop_4" Color="#99A3AF" Offset="1"/>
                    </LinearGradientBrush>
                </StackPanel.Background>
                <Slider x:Uid="pageSlider" Margin="0,24,0,0" Name="pageSlider" TickPlacement="TopLeft" Interval="1" SmallChange="1" 
                        Minimum="0" LargeChange="4" AutoToolTipPlacement="TopLeft" IsSelectionRangeEnabled="True" 
                        IsMoveToPointEnabled="True" Height="22" VerticalAlignment="Top"  Width="150" ValueChanged="pageSlider_ValueChanged" 
                         />
                <Button x:Uid="btnClosePageNumberPop" Name="btnClosePageNumberPop" Content="Close" ToolTip="Close This Popup" Click="btnClosePageNumberPop_Click" 
                        HorizontalAlignment="Right" Margin="5,5,15,5" />
            </StackPanel>
        </Popup>


                <StatusBar x:Uid="statusBar1" x:Name="statusBar1" DockPanel.Dock="Bottom" >
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate x:Uid="ItemsPanelTemplate_1">
                    <Grid x:Uid="Grid_2">
                        <Grid.RowDefinitions>
                            <RowDefinition x:Uid="RowDefinition_1" Height="*"/>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition x:Uid="ColumnDefinition_1" Width="44"/>
                            <ColumnDefinition x:Uid="ColumnDefinition_2" Width="100"/>
                            <ColumnDefinition x:Uid="ColumnDefinition_3" Width="*"/>
                                <ColumnDefinition x:Uid="ColumnDefinition_4" Width="165"/>
                                <ColumnDefinition x:Uid="ColumnDefinition_5" Width="25" />
                                <ColumnDefinition x:Uid="ColumnDefinition_6" Width="25" />
                                <ColumnDefinition x:Uid="ColumnDefinition_7" Width="5" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>

            <StatusBarItem x:Uid="StatusBarItem_1" Grid.Column="0">
                <StackPanel x:Uid="StackPanel_3" Orientation="Horizontal" >
                        <Button x:Uid="cmdFavorites" Name="cmdFavorites" Command="{Binding cmdFavoriteCommand}" >
                            <Button.Style>
                                <Style x:Uid="Style_3" TargetType="{x:Type Button}">
                                    <Style.Setters>
                                        <Setter x:Uid="Setter_3" Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate x:Uid="ControlTemplate_3" TargetType="{x:Type Button}">
                                                    <ControlTemplate.Resources>
                                                        <Storyboard x:Uid="Storyboard_1" x:Key="ShowShine">
                                                            <DoubleAnimationUsingKeyFrames x:Uid="DoubleAnimationUsingKeyFrames_1" BeginTime="00:00:00" Storyboard.TargetName="Shine" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame x:Uid="SplineDoubleKeyFrame_1" KeyTime="00:00:00.5000000" Value="1"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                        <Storyboard x:Uid="Storyboard_2" x:Key="HideShine">
                                                            <DoubleAnimationUsingKeyFrames x:Uid="DoubleAnimationUsingKeyFrames_2" BeginTime="00:00:00" Storyboard.TargetName="Shine" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                                <SplineDoubleKeyFrame x:Uid="SplineDoubleKeyFrame_2" KeyTime="00:00:00.3000000" Value="0"/>
                                                            </DoubleAnimationUsingKeyFrames>
                                                        </Storyboard>
                                                    </ControlTemplate.Resources>

                                                    <Border x:Uid="border1" Background="{TemplateBinding Background}" x:Name="border1" >
                                                        <Grid x:Uid="Grid_3">
                                                            <Border x:Uid="Shine" Grid.Row="1" Opacity="0" x:Name="Shine" Width="Auto" Height="Auto" CornerRadius="0,0,5,5" Margin="1,0,-1,0" Background="{TemplateBinding BorderBrush}"/>
                                                            <Image x:Uid="Image_1" Source="/LibraryFiles;component/Resources/favorite_24.png" Height="16" Width="16" MaxHeight="16" MaxWidth="16" Stretch="Uniform"
                                                               Margin="0,0,5,0"  Visibility="{Binding Path=IsFavorite, Converter={StaticResource BoolToVis}}" ToolTip="Comic is currently a FAVORITE. Click to remove from favorites."  />
                                                            <Image x:Uid="Image_2" Source="/LibraryFiles;component/Resources/nonFavorite_24.png" Height="16" Width="16" MaxHeight="16" MaxWidth="16" Stretch="Uniform"
                                                               Margin="0,0,5,0"  Visibility="{Binding Path=IsNotFavorite, Converter={StaticResource BoolToVis}}" ToolTip="Comic is not a FAVORITe. Click to add to favorites."  />
                                                        </Grid>
                                                    </Border>
                                                    <ControlTemplate.Triggers>
                                                        <Trigger x:Uid="Trigger_1" Property="IsEnabled" Value="False" >
                                                            <Setter x:Uid="Setter_4" Property="Opacity" TargetName="border1" Value="0.5" />
                                                        </Trigger>
                                                        <Trigger x:Uid="Trigger_2" Property="IsMouseOver" Value="True">
                                                            <Trigger.ExitActions>
                                                                <BeginStoryboard x:Uid="HideShine_BeginStoryboard" Storyboard="{StaticResource HideShine}" x:Name="HideShine_BeginStoryboard" />
                                                            </Trigger.ExitActions>
                                                            <Trigger.EnterActions>
                                                                <BeginStoryboard x:Uid="ShowShine_BeginStoryboard" x:Name="ShowShine_BeginStoryboard" Storyboard="{StaticResource ShowShine}" />
                                                            </Trigger.EnterActions>
                                                        </Trigger>
                                                    </ControlTemplate.Triggers>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style.Setters>
                                </Style>
                            </Button.Style>
                        </Button>
                        <Separator x:Uid="Separator_3" ></Separator>
                        <Label x:Uid="lblPageNumber" x:Name="lblPageNumber" MaxWidth="40" MinWidth="40" Width="40" MouseRightButtonDown="lblPageNumber_MouseRightButtonDown"  />                    
                </StackPanel>
            </StatusBarItem>

            <StatusBarItem x:Uid="StatusBarItem_2" Grid.Column="2">
                <Label x:Uid="lblPageName" x:Name="lblPageName" MouseRightButtonDown="lblPageName_MouseRightButtonDown"  />
            </StatusBarItem>


            <StatusBarItem x:Uid="StatusBarItem_3" Grid.Column="3">
                <ProgressBar x:Uid="prgLoading" Name="prgLoading" Height="12px" VerticalAlignment="Center" HorizontalAlignment="Right"  
                            Margin="0,0,10,0" Width="150px" />
            </StatusBarItem>
            
            <StatusBarItem x:Uid="StatusBarItem_4" Grid.Column="4" >
                <Image x:Uid="Image_3" Source="{Binding Path=Comic, Converter={StaticResource catCov}}" Height="16" Width="16" MaxHeight="16" MaxWidth="16" Stretch="Uniform"
                       Margin="0,0,5,0"/>
                </StatusBarItem>
                <StatusBarItem x:Uid="StatusBarItem_5" Grid.Column="5" >
                    <Button x:Uid="btnUpdate" Name="btnUpdate"  Visibility="{Binding Path=DisplayUpdate, Converter={StaticResource BoolToVis}}" 
                            Click="btnUpdate_Click"  ToolTip="An update is available. Click here to go to the site and download the latest version of eComic." >
                        <Button.Style>
                            <Style x:Uid="Style_4" TargetType="{x:Type Button}"> 
                                <Style.Setters>
                                <Setter x:Uid="Setter_5" Property="Template">
                                    <Setter.Value>
                                            <ControlTemplate x:Uid="ControlTemplate_4" TargetType="{x:Type Button}">
                                                <ControlTemplate.Resources>
                                                    <Storyboard x:Uid="Storyboard_3" x:Key="ShowShine">
                                                        <DoubleAnimationUsingKeyFrames x:Uid="DoubleAnimationUsingKeyFrames_3" BeginTime="00:00:00" Storyboard.TargetName="Shine" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame x:Uid="SplineDoubleKeyFrame_3" KeyTime="00:00:00.5000000" Value="1"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                    <Storyboard x:Uid="Storyboard_4" x:Key="HideShine">
                                                        <DoubleAnimationUsingKeyFrames x:Uid="DoubleAnimationUsingKeyFrames_4" BeginTime="00:00:00" Storyboard.TargetName="Shine" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                            <SplineDoubleKeyFrame x:Uid="SplineDoubleKeyFrame_4" KeyTime="00:00:00.3000000" Value="0"/>
                                                        </DoubleAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </ControlTemplate.Resources>

                                                <Border x:Uid="Border_3" Background="{TemplateBinding Background}" x:Name="border1" >
                                                    <Grid x:Uid="Grid_4">
                                                        <Border x:Uid="Border_4" Grid.Row="1" Opacity="0" x:Name="Shine" Width="Auto" Height="Auto" CornerRadius="0,0,5,5" Margin="1,0,-1,0" Background="{TemplateBinding BorderBrush}"/>
                                                        <Image x:Uid="Image_4" Source="/LibraryFiles;component/Resources/update_recommended_24.png" Height="16" Width="16" MaxHeight="16" MaxWidth="16" Stretch="Uniform"
                                                               Margin="0,0,5,0" />
                                                    </Grid>
                                                    </Border>
                                                <ControlTemplate.Triggers>
                                                    <Trigger x:Uid="Trigger_3" Property="IsEnabled" Value="False" >
                                                        <Setter x:Uid="Setter_6" Property="Opacity" TargetName="border1" Value="0.5" />
                                                    </Trigger>
                                                    <Trigger x:Uid="Trigger_4" Property="IsMouseOver" Value="True">
                                                        <Trigger.ExitActions>
                                                            <BeginStoryboard x:Uid="BeginStoryboard_1" Storyboard="{StaticResource HideShine}" x:Name="HideShine_BeginStoryboard" />
                                                        </Trigger.ExitActions>
                                                        <Trigger.EnterActions>
                                                            <BeginStoryboard x:Uid="BeginStoryboard_2" x:Name="ShowShine_BeginStoryboard" Storyboard="{StaticResource ShowShine}" />
                                                        </Trigger.EnterActions>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                                </Style.Setters>
                            </Style>
                        </Button.Style>
                    
                    </Button>
                </StatusBarItem>
            </StatusBar>


            <Border x:Uid="brdListPagesBottom" Margin="2,2,2,5" Padding="8" Background="#7D8E8F" Visibility="Collapsed" DockPanel.Dock="Bottom" x:Name="brdListPagesBottom"  CornerRadius="8,8,8,8">
                <ListBox x:Uid="lstPagesBottom" Style="{StaticResource PageListBoxStyleHorizontal}" ItemsSource="{Binding Path=Pages}"
                     Margin="6,6,6,0" VerticalAlignment="Bottom"  HorizontalAlignment="Center"  IsSynchronizedWithCurrentItem="True" 
                     ScrollViewer.VerticalScrollBarVisibility="Hidden"  ScrollViewer.HorizontalScrollBarVisibility="Auto" 
                     SelectionMode="Single" AllowDrop="True" Visibility="Visible"   Name="lstPagesBottom" >
                    <ListBox.ItemTemplate>
                        <DataTemplate  x:Uid="DataTemplate_2" DataType="{x:Type local:comicPage}">
                            <Grid x:Uid="Grid_5" Margin="6" Visibility="Visible" KeyUp="eComic_KeyUp">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Uid="ColumnDefinition_8" Width="60" />
                                </Grid.ColumnDefinitions>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Uid="RowDefinition_2" />
                                    <RowDefinition x:Uid="RowDefinition_3" />
                                    <RowDefinition x:Uid="RowDefinition_4" />
                                </Grid.RowDefinitions>
                                <Label x:Uid="Label_2" Grid.Row="2" Content="{Binding Path=FileName, FallbackValue=Test}" Visibility="Collapsed"   />
                                <Image x:Uid="imgPage" x:Name="imgPage" HorizontalAlignment="Center" Height="60" Grid.Row="0" 
                                       Source="{Binding Path=FileNameUri}" RenderTransformOrigin="0.5,0.5"
                                       VerticalAlignment="Bottom">
                                    <Image.RenderTransform>
                                        <TransformGroup x:Uid="TransformGroup_1">
                                            <ScaleTransform x:Uid="ScaleTransform_1" ScaleX="1" ScaleY="1"/>
                                            <SkewTransform x:Uid="SkewTransform_1" AngleX="0" AngleY="0"/>
                                            <RotateTransform x:Uid="RotateTransform_1" Angle="0"/>
                                            <TranslateTransform x:Uid="TranslateTransform_1" X="0" Y="0"/>
                                        </TransformGroup>
                                    </Image.RenderTransform>
                                    <Image.ToolTip>
                                        <ToolTip x:Uid="ToolTip_1" Style="{DynamicResource TransparentToolTipStyle}">
                                            <ContentControl x:Uid="ContentControl_1" Content="{Binding Path=FileName}" />
                                        </ToolTip>
                                    </Image.ToolTip>
                                </Image>
                                <Rectangle x:Uid="rectReflection" HorizontalAlignment="Stretch" Margin="0,1,0,0" x:Name="rectReflection" Width="Auto" Grid.Row="1" Height="30">
                                    <Rectangle.Fill>
                                        <VisualBrush x:Uid="VisualBrush_1" Stretch="None" AlignmentX="Center" AlignmentY="Top"
						                         Visual="{Binding ElementName=imgPage}">
                                            <VisualBrush.RelativeTransform>
                                                <TransformGroup x:Uid="TransformGroup_2">
                                                    <MatrixTransform x:Uid="MatrixTransform_1" Matrix="1,0,0,-1,0,0" />
                                                    <TranslateTransform x:Uid="TranslateTransform_2" Y="1" />
                                                    <ScaleTransform x:Uid="ScaleTransform_2" ScaleX="1" ScaleY="-1" CenterX="0.5" CenterY="0.5"/>
                                                </TransformGroup>
                                            </VisualBrush.RelativeTransform>
                                        </VisualBrush>
                                    </Rectangle.Fill>
                                    <Rectangle.OpacityMask>
                                        <RadialGradientBrush x:Uid="RadialGradientBrush_1" GradientOrigin="0.5,1.041">
                                            <RadialGradientBrush.RelativeTransform>
                                                <TransformGroup x:Uid="TransformGroup_3">
                                                    <ScaleTransform x:Uid="ScaleTransform_3" CenterX="0.5" CenterY="0.5" ScaleX="1.202" ScaleY="2.865"/>
                                                    <SkewTransform x:Uid="SkewTransform_2" AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                                    <RotateTransform x:Uid="RotateTransform_2" Angle="0" CenterX="0.5" CenterY="0.5"/>
                                                    <TranslateTransform x:Uid="TranslateTransform_3" X="-0.002" Y="-0.491"/>
                                                </TransformGroup>
                                            </RadialGradientBrush.RelativeTransform>
                                            <GradientStop x:Uid="GradientStop_5" Color="#FF000000" Offset="0"/>
                                            <GradientStop x:Uid="GradientStop_6" Color="#00000000" Offset="0.8"/>
                                        </RadialGradientBrush>
                                    </Rectangle.OpacityMask>
                                </Rectangle>
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
                    <ListBox.Background>
                        <LinearGradientBrush x:Uid="LinearGradientBrush_3" EndPoint="0.466,0.06" StartPoint="0.465,0.877">
                            <GradientStop x:Uid="GradientStop_7" Color="#BFBFBF" Offset="0"/>
                            <GradientStop x:Uid="GradientStop_8" Color="#1D252F" Offset="1"/>
                        </LinearGradientBrush>
                    </ListBox.Background>
                </ListBox>
            </Border>


            <Popup x:Uid="popFullScreenControlPanel" Name="popFullScreenControlPanel" AllowsTransparency="True" Placement="Bottom"  HorizontalAlignment="Center" 
                        PlacementTarget="{Binding ElementName=imgBorder}"  VerticalOffset="-50"  >
                <StackPanel x:Uid="spFullScreenControlPanel" Name="spFullScreenControlPanel" Orientation="Horizontal"  HorizontalAlignment="Center" Visibility="Collapsed" DockPanel.Dock="Bottom"  Opacity="0.6"  >
                    <Border x:Uid="Border_5" ClipToBounds="True" Margin="1,1,1,1" Padding="0"  DockPanel.Dock="Right" CornerRadius="30">
                        <Border.Background>
                            <LinearGradientBrush x:Uid="LinearGradientBrush_4" EndPoint="0.466,0.06" StartPoint="0.465,0.877">
                                <GradientStop x:Uid="GradientStop_9" Color="#E0E7EF" Offset="0"/>
                                <GradientStop x:Uid="GradientStop_10" Color="#99A3AF" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <StackPanel x:Uid="StackPanel_4" Orientation="Horizontal">
                            <Button x:Uid="btnZoomIn" Name="btnZoomIn" Click="btnZoomIn_Click" Margin="25,3,1,3" ToolTip="Zoom In" >
                                <Image x:Uid="Image_5" Source="/LibraryFiles;component/Resources/viewmag_plus_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                            <Button x:Uid="btnZoomOut" Name="btnZoomOut"  Click="btnZoomOut_Click" Margin="1,3,1,3" ToolTip="Zoom Out" >
                                <Image x:Uid="Image_6" Source="/LibraryFiles;component/Resources/viewmag_minus_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                            <Button x:Uid="btnZoomFill" Name="btnZoomFill" Click="btnZoomFill_Click" Margin="1,3,1,1" ToolTip="Fit Image" >
                                <Image x:Uid="Image_7" Source="/LibraryFiles;component/Resources/viewmagfit_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                            <Button x:Uid="btn1to1" Name="btn1to1"  Click="btn1to1_Click" Margin="1,3,5,1" ToolTip="Display Image in Original size" >
                                <Image x:Uid="Image_8" Source="/LibraryFiles;component/Resources/viewmag1_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                            <Canvas x:Uid="Canvas_1" Width="2" Background="DarkGray" Margin="5,0,5,0" />
                            <Button x:Uid="btnPreviousPage" Name="btnPreviousPage"  Click="btnPreviousPage_Click" Margin="10,3,1,3" ToolTip="Go to Previous Page">
                                <Image x:Uid="Image_9" Source="/LibraryFiles;component/Resources/arrow-left_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                            <Button x:Uid="btnNextPage" Name="btnNextPage"  Click="btnNextPage_Click" Margin="1,3,10,3" ToolTip="Go to Next Page" >
                                <Image x:Uid="Image_10" Source="/LibraryFiles;component/Resources/arrow-right_24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>

                            <Slider x:Uid="sldPageNmbers" Margin="10,3,10,3" Name="sldPageNmbers" Interval="1" SmallChange="1" Minimum="0" ToolTip="Choose displayed page"   
                                LargeChange="4" AutoToolTipPlacement="TopLeft" IsMoveToPointEnabled="True" Width="200"
                                ValueChanged="sldPageNmbers_ValueChanged" />

                            <Canvas x:Uid="Canvas_2" Width="2" Background="DarkGray" Margin="5,0,5,0" />

                            <Button x:Uid="btnLeaveFullScreen" Name="btnLeaveFullScreen" Click="btnLeaveFullScreen_Click" Margin="10,3,25,3" ToolTip="Leave full screen mode" >
                                <Image x:Uid="Image_11" Source="/LibraryFiles;component/Resources/view-nofullscreen-24.png" MaxHeight="18" MinHeight="18" MinWidth="18" MaxWidth="18" />
                            </Button>
                        </StackPanel>
                    </Border>
                </StackPanel>

            </Popup>
        
            <Border x:Uid="brdListPages" Margin="4,2,5,2" Padding="8" Background="#7D8E8F"  DockPanel.Dock="Right" x:Name="brdListPages"  CornerRadius="8,8,8,8">
            <ListBox x:Uid="lstPages" Style="{StaticResource PageListBoxStyle}" SelectionChanged="lstPages_SelectionChanged" 
                     Margin="6,6,6,0" VerticalAlignment="Top"  IsSynchronizedWithCurrentItem="True"  ItemsSource="{Binding Path=Pages}"
                     ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled" 
                     SelectionMode="Single" AllowDrop="True" Visibility="Visible" Name="lstPages"                     
                    >
                <ListBox.ItemTemplate>
                    <DataTemplate  x:Uid="DataTemplate_3" DataType="{x:Type local:comicPage}">
                        <Grid x:Uid="Grid_6" Margin="6" Visibility="Visible" KeyUp="eComic_KeyUp">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition x:Uid="ColumnDefinition_9" Width="60" />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition x:Uid="RowDefinition_5" />
                                <RowDefinition x:Uid="RowDefinition_6" />
                                <RowDefinition x:Uid="RowDefinition_7" />
                            </Grid.RowDefinitions>
                            <Label x:Uid="Label_3" Grid.Row="2" Content="{Binding Path=FileName, FallbackValue=Test}" Visibility="Collapsed"   />
                            <Image x:Uid="Image_12" x:Name="imgPage" HorizontalAlignment="Center" Height="60" Grid.Row="0" 
                                   Source="{Binding Path=FileNameUri}" RenderTransformOrigin="0.5,0.5"
                                   VerticalAlignment="Bottom">
                                <Image.RenderTransform>
                                    <TransformGroup x:Uid="TransformGroup_4">
                                        <ScaleTransform x:Uid="ScaleTransform_4" ScaleX="1" ScaleY="1"/>
                                        <SkewTransform x:Uid="SkewTransform_3" AngleX="0" AngleY="0"/>
                                        <RotateTransform x:Uid="RotateTransform_3" Angle="0"/>
                                        <TranslateTransform x:Uid="TranslateTransform_4" X="0" Y="0"/>
                                    </TransformGroup>
                                </Image.RenderTransform>
                                <Image.ToolTip>
                                    <ToolTip x:Uid="ToolTip_2" Style="{DynamicResource TransparentToolTipStyle}">
                                        <ContentControl x:Uid="ContentControl_2" Content="{Binding Path=FileName}" />
                                    </ToolTip>
                                </Image.ToolTip>
                            </Image>
                            <Rectangle x:Uid="Rectangle_1" HorizontalAlignment="Stretch" Margin="0,1,0,0" x:Name="rectReflection" Width="Auto" Grid.Row="1" Height="30">
                                <Rectangle.Fill>
                                    <VisualBrush x:Uid="VisualBrush_2" Stretch="None" AlignmentX="Center" AlignmentY="Top"
						                         Visual="{Binding ElementName=imgPage}">
                                        <VisualBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_5">
                                                <MatrixTransform x:Uid="MatrixTransform_2" Matrix="1,0,0,-1,0,0" />
                                                <TranslateTransform x:Uid="TranslateTransform_5" Y="1" />
                                                <ScaleTransform x:Uid="ScaleTransform_5" ScaleX="1" ScaleY="-1" CenterX="0.5" CenterY="0.5"/>
                                            </TransformGroup>
                                        </VisualBrush.RelativeTransform>
                                    </VisualBrush>
                                </Rectangle.Fill>
                                <Rectangle.OpacityMask>
                                    <RadialGradientBrush x:Uid="RadialGradientBrush_2" GradientOrigin="0.5,1.041">
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup x:Uid="TransformGroup_6">
                                                <ScaleTransform x:Uid="ScaleTransform_6" CenterX="0.5" CenterY="0.5" ScaleX="1.202" ScaleY="2.865"/>
                                                <SkewTransform x:Uid="SkewTransform_4" AngleX="0" AngleY="0" CenterX="0.5" CenterY="0.5"/>
                                                <RotateTransform x:Uid="RotateTransform_4" Angle="0" CenterX="0.5" CenterY="0.5"/>
                                                <TranslateTransform x:Uid="TranslateTransform_6" X="-0.002" Y="-0.491"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop x:Uid="GradientStop_11" Color="#FF000000" Offset="0"/>
                                        <GradientStop x:Uid="GradientStop_12" Color="#00000000" Offset="0.8"/>
                                    </RadialGradientBrush>
                                </Rectangle.OpacityMask>
                            </Rectangle>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
                <ListBox.Background>
                    <LinearGradientBrush x:Uid="LinearGradientBrush_5" EndPoint="0.466,0.06" StartPoint="0.465,0.877">
                        <GradientStop x:Uid="GradientStop_13" Color="#BFBFBF" Offset="0"/>
                        <GradientStop x:Uid="GradientStop_14" Color="#1D252F" Offset="1"/>
                    </LinearGradientBrush>
                </ListBox.Background>
            </ListBox>
        </Border>

            <Border x:Uid="imgBorder" x:Name="imgBorder" ClipToBounds="True" Margin="1,1,1,1" Padding="0" Background="White"  DockPanel.Dock="Right"  CornerRadius="8,8,8,8" PreviewMouseMove="imgFull_PreviewMouseMove" >
                <local:exImage x:Uid="imgFull" x:Name="imgFull" Source="{Binding FileNameUri}" RenderTransformOrigin="0.5,0.5" ClipToBounds="False"  
                           Stretch="Uniform" StretchDirection="Both" KeyUp="eComic_KeyUp" MouseLeftButtonDown="imgFull_MouseLeftButtonDown"     
                           MouseWheel="imgFull_MouseWheel" MouseMove="imgFull_MouseMove" MouseLeftButtonUp="imgFull_MouseLeftButtonUp" 
                           MouseDown="imgFull_MouseDown" >
                    
                    <local:exImage.Effect>                        
                        <local:BrightContrastEffect 
                                x:Uid="local:BrightContrastEffect_1" Brightness="{Binding Path=Brightness}"
                                Contrast="{Binding Path=Contrast}"/>                        
                    </local:exImage.Effect>
                </local:exImage>
            </Border>
    </DockPanel>

        <Canvas x:Uid="Canvas_3" HorizontalAlignment="Left" VerticalAlignment="Top">
            <Canvas x:Uid="magnifierCanvas" Name="magnifierCanvas" IsHitTestVisible="False"
                    Visibility="{Binding ElementName=chkLoupe, Path=IsChecked,Converter={StaticResource BoolToVis}}">
               
                <Ellipse x:Uid="Ellipse_1" Width="200" Height="200" Fill="White" />
                <Ellipse x:Uid="magnifierEllipse" Width="200" Height="200" Name="magnifierEllipse" StrokeThickness="3">
                    <Ellipse.Fill>
                        <VisualBrush x:Uid="VisualBrush_3" ViewboxUnits="Absolute" Viewbox="0,0,505,0"
                                     ViewportUnits="RelativeToBoundingBox" Viewport="0,0,1,1"/>
                    </Ellipse.Fill>
                    <Ellipse.Stroke>
                        <LinearGradientBrush x:Uid="LinearGradientBrush_6" StartPoint="0,0" EndPoint="0,1">
                            <GradientStop x:Uid="GradientStop_15" Offset="0" Color="#AAA" />
                            <GradientStop x:Uid="GradientStop_16" Offset="1" Color="#111" />
                        </LinearGradientBrush>
                    </Ellipse.Stroke>
                </Ellipse>
                <Ellipse x:Uid="Ellipse_2" Canvas.Left="2" Canvas.Top="2" StrokeThickness="4" Width="196" Height="196">
                    <Ellipse.Stroke>
                        <LinearGradientBrush x:Uid="LinearGradientBrush_7" StartPoint="0,0" EndPoint="0,1">
                            <GradientStop x:Uid="GradientStop_17" Offset="0" Color="#555" />
                            <GradientStop x:Uid="GradientStop_18" Offset="1" Color="#EEE" />
                        </LinearGradientBrush>
                    </Ellipse.Stroke>

                </Ellipse>
            </Canvas>
        </Canvas>   

    </Grid>
</r:RibbonWindow>
